﻿using oldislandapi.IService;
using oldislandapi.Models;
using System.Linq.Expressions;

namespace oldislandapi.Service
{
    public class ClassicService :IClassicService
    {
        public async Task<Classic> GetSingleDataAsync(Expression<Func<Classic, bool>> expression)
            => await DBContext.DB.Queryable<Classic>().Where(expression).OrderBy(x => x.Updated_At, SqlSugar.OrderByType.Desc).FirstAsync();
    }
}
